Linking to GEOS 3.8.1, GDAL 3.1.4, PROJ 6.3.1
Registered S3 method overwritten by 'htmlwidgets':
  method           from         
  print.htmlwidget tools:rstudio

Attachement du package : ‘plotly’

The following object is masked from ‘package:ggplot2’:

    last_plot

The following object is masked from ‘package:stats’:

    filter

The following object is masked from ‘package:graphics’:

    layout


Attachement du package : ‘tidygraph’

The following object is masked from ‘package:quanteda’:

    convert

The following object is masked from ‘package:stats’:

    filter

Hypercubes exploration

The different dimensions of an hypercube can be analysed through different aggregation of the dimensions of the hypercubes, leading to different tables authorizing different modes of visualization. Each function is named according to the dimensions that are combined.

We start here from the situation of a researcher interested by the topic of human mobility and we load the hypercube elaborated in the previous section. We decide to analyze the topic without distinction between migrants and refugees.

hc <- readRDS("data/corpus/hc_mycorpus_states_mobil_day.RDS")

But the analysis by day is not necessary the most relevant and we can decide to create the same hypercube aggregated by week, month, quarter or year. The operation is done very easily with the package data.table.

# store distribution by day
hc_day<-hc

# Agregation by week
hc<-hc_day
hc$when <- cut(hc$when,breaks="week")
hc_week <-hc[,.(news=sum(news),tags=sum(tags)),list(who,when,where1,where2,what)]

# Agregation by month
hc<-hc_day
hc$when <- cut(hc$when,breaks="month")
hc_month <-hc[,.(news=sum(news),tags=sum(tags)),list(who,when,where1,where2,what)]

# Agregation by quarter
hc<-hc_day
hc$when <- cut(hc$when,breaks="quarter")
hc_quarter <-hc[,.(news=sum(news),tags=sum(tags)),list(who,when,where1,where2,what)]

# Agregation by year
hc<-hc_day
hc$when <- cut(hc$when,breaks="year")
hc_year <-hc[,.(news=sum(news),tags=sum(tags)),list(who,when,where1,where2,what)]

WHAT

The first question (WHAT) is the evaluation of the proportion of news related to the topic.

res_what <- what(hc = hc,
             subtop = NA,
             title = "Topic news")
res_what$table
res_what$plotly

The table indicate that 3154 news was associated to the topic which represent 2.73% of the total.

WHO.WHAT

The second question (WHO.WHAT) explore the variation of interest for the topic in the different media of the corpus.

Example



res_who_what<- who.what(hc=hc, 
                        test = FALSE,
                        minsamp = 20,
                        mintest = 5,
                        title = "Topic news by media - Salience")

kable(res_who_what$table)
who trial success null.value estimate salience chi2 p.value index
fr_FRA_libera 28827 607 0.0273 0.02106 0.7714286 42.08 1.00000 0.7714286
fr_DZA_elwata 11581 292 0.0273 0.02521 0.9234432 1.82 0.91137 0.9234432
fr_BEL_derheu 16358 349 0.0273 0.02134 0.7816850 21.69 1.00000 0.7816850
fr_FRA_figaro 22999 1005 0.0273 0.04370 1.6007326 232.26 0.00000 1.6007326
fr_BEL_lesoir 26057 652 0.0273 0.02502 0.9164835 5.01 0.98737 0.9164835
fr_DZA_xpress 9814 249 0.0273 0.02537 0.9293040 1.30 0.87310 0.9293040
res_who_what$plotly 

res_who_what<- who.what(hc=hc, 
                        test = TRUE,
                        minsamp = 5,
                        mintest = 1,
                        title = "Topic news by media - Significance")
res_who_what$plotly
NA

The analysis reveal a clear over-representation of the topic in the french newspaper Le Figaro (4.37% of news) as compared to the other media (2.1 to 2.5%).

WHEN.WHAT

The third question (WHEN.WHAT) is related to the evolution of the interest of all media from the corpus for the topic of interest through time. Here we can choose different levels of time agregation.

Example


res_when_what<- when.what(hc=hc_week, 
                          test=FALSE,
                          minsamp=10,
                          mintest=5,
                          title = "Topic news by week - Salience")

res_when_what$plotly


res_when_what<- when.what(hc=hc_week, 
                          test=TRUE,
                          minsamp=10,
                          mintest=5,
                          title = "Topic news by week - Significance")
res_when_what$plotly

The analysis reveals clear discontinuities in the timeline of the topic with isolated periods of crisis in 2014 followed by a giant peak at the end of the summer 2015.

WHERE.WHAT

The fourth question (WHERE.WHAT) analyze the countries that are the most associated to the topic of interest. We exclude therefore the news where no countries are mentioned and we analyze for each country the proportion of news that are associated to the topic.

Example

map<-readRDS("data/map/world_ctr_4326.Rdata")
hc2<-hc %>% filter(where1 !="_no_", where2 !="_no_")
res_where_what<- where.what(hc=hc2,
                            test=FALSE,
                            map = map, 
                            minsamp=10,
                            mintest =5,
                            title = "Topic news by states - Salience")
res_where_what$plotly

res_where_what<- where.what(hc=hc2,
                            test=TRUE,
                            minsamp=10,
                            map = map, 
                            mintest =5,
                            title = "Topic news by states - Significance")
res_where_what$plotly

The analysis reveals that some countries are “specialized” in the topic during the period of observation. For example 53.5% of the news about Hungary was associated to the question of migrants and refugees, which is obviously related to the mediatization of the wall established by Viktor Orban in 2015. Other countries are characterized on the contrary by an under-representation of the topic like the USA where the topic is only associated to 0.7% of news. But the situation will change after Donald Trump’s election who will also establish a wall which will dramatically increase the number of news about USA and migrants.

WHEN.WHO.WHAT

Despite our limited sample size, we can try to ask more complex question that combine three dimensions. We can for example examine the synchronization of media through time about the topic of interest (WHEN.WHO.WHAT) We decide here to use a large time span because of the reduction of the sample

Example


res_when_who_what<- when.who.what(hc=hc_month,
                                  test = FALSE,
                                  minsamp = 20,
                                  mintest = 5,
                                  title = "Topic news by month and by media - Salience")
res_when_who_what$plotly

res_when_who_what<- when.who.what(hc=hc_month,
                                  test = TRUE,
                                  minsamp = 20,
                                  mintest = 5,
                                  title = "Topic news by month and by media - Significance")
res_when_who_what$plotly

The figure reveals a global synchronization of media agenda concerning the topic, especially concerning the major peak of interest located in september 2015. The first period of crisis of April 2015 is also visible in all media, with the exception of the belgian newspaper “Dernière Heure” which did not cover apparently the dramatic events of boat sinking in the Mediterranean more than usual. Another interesting difference can be observed for the two algerian newspapers that was characterized by an higher coverage of the topic during the year 2014.

WHERE.WHO.WHAT

Another example of combination of the three dimensions can be realized by exploring if some countries are more mentioned by some media in relation with the topic of interest. In other words, do we observe a geographic synchronization of the agenda of media.

Example

hc2<-hc %>% filter(where1 !="_no_", where2 !="_no_") %>% mutate(who=substr(who,4,6))
res_where_who_what<- where.who.what(hc= hc2,
                                    maxloc= 20,
                                    test=FALSE,
                                    minsamp=5,
                                    mintest=2,
                                    title = "Topic news by media and by states - Salience")
res_where_who_what$plotly

res_where_who_what<- where.who.what(hc= hc2,
                                    maxloc= 20,
                                    test=TRUE,
                                    minsamp=5,
                                    mintest=2,
                                    title = "Topic news by media and by states - Salience")
res_where_who_what$plotly
NA

The analyse reveals that some countries are systematically associated to the topic by all media like Syria, Italy or Libya. Other countries are associated to migrants but not systematically like United Kingdom which iis associated to the topic by belgian newspapers but not by french and algerian ones.

WHEN.WHERE.WHAT

The last case of combination of three dimensions concerns the time variation of the association between the topics and the countries through time. It can typically reveal the effect of dramatic event occuring in one country at a period of time. Unfortunately, the sample is too limited in size for an in depth exploration of crisis and we are obliged to limit our example to the comparison of the 8 quarters of years.

Function

Example


res_when_where_what<- when.where.what(hc=hc_quarter,
                                    maxloc= 15,
                                    test=FALSE,
                                    minsamp=5,
                                    mintest=2,
                                    title = "Topic news by year and by states - Salience")
res_when_where_what$plotly
res_when_where_what<- when.where.what(hc=hc_quarter,
                                    maxloc= 15,
                                    test=TRUE,
                                    minsamp=5,
                                    mintest=2,
                                    title = "Topic news by year and by states - Significance")
res_when_where_what$plotly
NA

The analysis confirms that in the majority of case, the most important association of countries with the topic took place in 2015 with a major peak in the third quarter of this year (August-September-October). But some interesting exceptions can be observed, in particular in the case of Italy or Iraq which was yet strongly associated to the question of migrants and refugees in spring and sumer 2014. But the sample size is too limited for a detailed analysis with smaller divisions of time.

LS0tCnRpdGxlOiAiR2VvZ3JhcGhpY2FsIGFuYWx5c2lzIG9mIG1lZGlhIgpzdWJ0aXRsZTogIjUuIEh5cGVyY3ViZXMgZXhwbG9yYXRpb24iCmF1dGhvcjogIkNsYXVkZSBHcmFzbGFuZCIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKCmBgYHtyIHNldHVwMiwgZWNobyA9IEZBTFNFLCAgd2FybmluZyA9IEZBTFNFLCBtZXNzYWdlID0gRkFMU0V9CmtuaXRyOjpvcHRzX2NodW5rJHNldChlY2hvID0gVFJVRSwgIHdhcm5pbmcgPSBGQUxTRSwgbWVzc2FnZT1GQUxTRSkKc291cmNlKCJwZ20vaHlwZXJuZXdzX2Z1bmN0aW9uc19WNi5SIikKYGBgCgoKCgojIEh5cGVyY3ViZXMgZXhwbG9yYXR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5SZGF0YSIpCmhjMjwtaGMgJT4lIGZpbHRlcih3aGVyZTEgIT0iX25vXyIsIHdoZXJlMiAhPSJfbm9fIikKcmVzX3doZXJlX3doYXQ8LSB3aGVyZS53aGF0KGhjPWhjMiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlc3Q9RkFMU0UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXAgPSBtYXAsIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluc2FtcD0xMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbnRlc3QgPTUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9ICJUb3BpYyBuZXdzIGJ5IHN0YXRlcyAtIFNhbGllbmNlIikKcmVzX3doZXJlX3doYXQkcGxvdGx5CgpyZXNfd2hlcmVfd2hhdDwtIHdoZXJlLndoYXQoaGM9aGMyLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVzdD1UUlVFLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluc2FtcD0xMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcCA9IG1hcCwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW50ZXN0ID01LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSAiVG9waWMgbmV3cyBieSBzdGF0ZXMgLSBTaWduaWZpY2FuY2UiKQpyZXNfd2hlcmVfd2hhdCRwbG90bHkKYGBgCgpUaGUgYW5hbHlzaXMgcmV2ZWFscyB0aGF0IHNvbWUgY291bnRyaWVzIGFyZSAic3BlY2lhbGl6ZWQiIGluIHRoZSB0b3BpYyBkdXJpbmcgdGhlIHBlcmlvZCBvZiBvYnNlcnZhdGlvbi4gRm9yIGV4YW1wbGUgNTMuNSUgb2YgdGhlIG5ld3MgYWJvdXQgSHVuZ2FyeSB3YXMgYXNzb2NpYXRlZCB0byB0aGUgcXVlc3Rpb24gb2YgbWlncmFudHMgYW5kIHJlZnVnZWV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gbWVzc2FnZSA9IEZBTFNFfQoKcmVzX3doZW5fd2hvX3doYXQ8LSB3aGVuLndoby53aGF0KGhjPWhjX21vbnRoLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVzdCA9IEZBTFNFLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluc2FtcCA9IDIwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWludGVzdCA9IDUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9ICJUb3BpYyBuZXdzIGJ5IG1vbnRoIGFuZCBieSBtZWRpYSAtIFNhbGllbmNlIikKcmVzX3doZW5fd2hvX3doYXQkcGxvdGx5CgpyZXNfd2hlbl93aG9fd2hhdDwtIHdoZW4ud2hvLndoYXQoaGM9aGNfbW9udGgsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXN0ID0gVFJVRSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbnNhbXAgPSAyMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbnRlc3QgPSA1LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSAiVG9waWMgbmV3cyBieSBtb250aCBhbmQgYnkgbWVkaWEgLSBTaWduaWZpY2FuY2UiKQpyZXNfd2hlbl93aG9fd2hhdCRwbG90bHkKYGBgCgpUaGUgZmlndXJlIHJldmVhbHMgYSBnbG9iYWwgc3luY2hyb25pemF0aW9uIG9mIG1lZGlhIGFnZW5kYSBjb25jZXJuaW5nIHRoZSB0b3BpYywgZXNwZWNpYWxseSBjb25jZXJuaW5nIHRoZSBtYWpvciBwZWFrIG9mIGludGVyZXN0IGxvY2F0ZWQgaW4gc2VwdGVtYmVyIDIwMTUuIFRoZSBmaXJzdCBwZXJpb2Qgb2YgY3Jpc2lzIG9mIEFwcmlsIDIwMTUgaXMgYWxzbyB2aXNpYmxlIGluIGFsbCBtZW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GVyZS53aG8ud2hhdChoYz0gaGMyLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhsb2M9IDIwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXN0PUZBTFNFLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW5zYW1wPTUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbnRlc3Q9MiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSAiVG9waWMgbmV3cyBieSBtZWRpYSBhbmQgYnkgc3RhdGVzIC0gU2FsaWVuY2UiKQpyZXNfd2hlcmVfd2hvX3doYXQkcGxvdGx5CgpyZXNfd2hlcmVfd2hvX3doYXQ8LSB3aGVyZS53aG8ud2hhdChoYz0gaGMyLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhsb2M9IDIwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXN0PVRSVUUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pbnNhbXA9NSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWludGVzdD0yLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9ICJUb3BpYyBuZXdzIGJ5IG1lZGlhIGFuZCBieSBzdGF0ZXMgLSBTYWxpZW5jZSIpCnJlc193aGVyZV93aG9fd2hhdCRwbG90bHkKCmBgYAoKVGhlIGFuYWx5c2UgcmV2ZWFscyB0aGF0IHNvbWUgY291bnRyaWVzIGFyZSBzeXN0ZW1hdGljYWxseSBhc3NvY2lhdGVkIHRvIHRoZSB0b3BpYyBieSBhbGwgbWVkaWEgbGlrZSBTeXJpYSwgSXRhbHkgb3IgTGlieWEuICBPdGhlciBjb3VudHJpZXMgYXJlIGFzc29jaWF0ZWQgdG8gbWlncmFudHMgYnV0IG5vdCBzeXN0ZW1hdGlj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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluc2FtcD01LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW50ZXN0PTIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gIlRvcGljIG5ld3MgYnkgeWVhciBhbmQgYnkgc3RhdGVzIC0gU2FsaWVuY2UiKQpyZXNfd2hlbl93aGVyZV93aGF0JHBsb3RseQpyZXNfd2hlbl93aGVyZV93aGF0PC0gd2hlbi53aGVyZS53aGF0KGhjPWhjX3F1YXJ0ZXIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heGxvYz0gMTUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlc3Q9VFJVRSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWluc2FtcD01LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW50ZXN0PTIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gIlRvcGljIG5ld3MgYnkgeWVhciBhbmQgYnkgc3RhdGVzIC0gU2lnbmlmaWNhbmNlIikKcmVzX3doZW5fd2hlcmVfd2hhdCRwbG90bHkKCmBgYAoKVGhlIGFuYWx5c2lzIGNvbmZpcm1zIHRoYXQgaW4gdGhlIG1ham9yaXR5IG9mIGNhc2UsIHRoZSBtb3N0IGltcG9ydGFudCBhc3NvY2lhdGlvbiBvZiBjb3VudHJpZXMgd2l0aCB0aGUgdG9waWMgdG9vayBwbGFjZSBpbiAyMDE1IHdpdGggYSBtYWpvciBwZWFrIGluIHRoZSB0aGlyZCBxdWFydGVyIG9mIHRoaXMgeWVhciAoQXVndXN0LVNlcHRlbWJlci1PY3RvYmVyKS4gQnV0IHNvbWUgaW50ZXJlc3RpbmcgZXhjZXB0aW9ucyBjYW4gYmUgb2JzZXJ2ZWQsIGluIHBhcnRpY3VsYXIgaW4gdGhl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